package com.fangcun.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fangcun.bean.api.user.request.UserAddressListRequest;
import com.fangcun.bean.api.user.response.UserAddressListResponse;
import com.fangcun.bean.api.user.response.UserAddressSearchResponse;
import com.fangcun.entity.UserReceivingAddress;

public interface UserReceivingAddressMapper {

	int deleteByPrimaryKey(Long id);

	int insert(UserReceivingAddress record);

	int insertSelective(UserReceivingAddress record);

	UserReceivingAddress selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(UserReceivingAddress record);

	int updateByPrimaryKey(UserReceivingAddress record);

	int updateDefaultByUserId(@Param("isDefault") Integer isDefault, @Param("userId") Long userId);

	List<UserAddressListResponse> listForApi(UserAddressListRequest request);
	
	List<UserAddressSearchResponse> selectAddressListByUserId(@Param("userId") Long userId, @Param("isDefault") Integer isDefault);

}